package com.demo.designmode.reponseibility.case2;

/**
 * 水果关键字过滤器
 * @author jiaxXM
 * @date 2024/9/19
 */
public class FruitsFilter implements Filter{
    @Override
    public String doFilter(String data, FilterChain filterChain) {
        //过滤水果关键字
        data = filterByWord(data, "水果");
        //拿到控制器，继续调用下一个过滤器
        return filterChain.preHandleRequest(data);
    }
}
